package cn.exrick.xboot.base.vo

import cn.exrick.xboot.core.common.constant.CommonConstant
import cn.exrick.xboot.core.common.utils.NameUtil
import cn.exrick.xboot.core.common.vo.RoleDTO
import cn.exrick.xboot.core.entity.Role
import com.fasterxml.jackson.annotation.JsonFormat
import io.swagger.annotations.ApiModelProperty
import org.springframework.format.annotation.DateTimeFormat
import java.util.*
import javax.print.attribute.standard.JobName
import javax.validation.constraints.Pattern

data class EnterpriseEmployeeVo(

        var id: String = "",

        @ApiModelProperty("用户名")
        var nickname: String = "",

        @ApiModelProperty("排序值")
        var sort: String = "",

        @ApiModelProperty("企业名字")
        var enterpriseName: String? = null,

        @ApiModelProperty(value = "手机")
        var mobile: @Pattern(regexp = NameUtil.regMobile, message = "11位手机号格式不正确") String? = null,

        @ApiModelProperty(value = "用户头像")
        var avatar: String? = CommonConstant.USER_DEFAULT_AVATAR,

        @ApiModelProperty(value = "邮箱")
        var email: @Pattern(regexp = NameUtil.regEmail, message = "邮箱格式不正确") String? = null,

        @ApiModelProperty(value = "区域id")
        var areaId: String? = null,

        @ApiModelProperty(value = "区域名称")
        var areaName: String? = null,

        @ApiModelProperty(value = "街道地址")
        var street: String? = null,

        @ApiModelProperty(value = "性别")
        var sex: String? = null,

        @ApiModelProperty(value = "所属部门id")
        var departmentId: String? = null,

        @ApiModelProperty(value = "所属部门名称")
        var departmentTitle: String? = "",

        @ApiModelProperty(value = "用户拥有角色")
        var roles: MutableList<Role>? = null,

        @ApiModelProperty("岗位名称")
        var jobName: String? = "",

        @ApiModelProperty("岗位id")
        var jobId: String? = "",

        @ApiModelProperty("自拍照")
        var selfPic: String? = "",

        @ApiModelProperty("生活照")
        var lifePic: String? = "",

        @ApiModelProperty("全家福")
        var familyPic: String? = "",

        @ApiModelProperty("是否能够直接离岗")
        var dimission: Boolean = false,

        @ApiModelProperty("入职时间")
        @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
        @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        var joinJobTime: Date? = null,

        @ApiModelProperty("岗前培训")
        var beforeResult: Int? = 1,

        @ApiModelProperty("岗后培训")
        var afterResult: Int? = 1,

        @ApiModelProperty(value = "用户类型 0普通用户 1管理员")
        var type: Int? = CommonConstant.USER_TYPE_NORMAL,

        @ApiModelProperty(value = "状态 默认0正常 -1拉黑")
        var status: Int? = CommonConstant.USER_STATUS_NORMAL,

        @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
        @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        @ApiModelProperty(value = "创建时间", hidden = true)
        var createTime: Date? = null
)
